import {actions} from '../base';

let url = 'admin/api/app-webpage';

export default {
    namespaced: true,
    state: {
        all: [],
        options: {
            types: {
                web_pc: {label: 'PC官网', value: "web_pc"},
                web_h5: {label: 'H5官网', value: "web_h5"},
                agreement: {label: '用户协议', value: "agreement"},
                privacy: {label: '隐私政策', value: "privacy"},
                customer: {label: '客服链接', value: "customer"},
            }
        },
        request: {
            all: false,
        }
    },
    mutations: {
        SET_ALL(state, data) {
            state.all = data;
        },
        SET_REQUESTING(state, name) {
            state.request[name] = true;
        },
        SET_REQUESTED(state, name) {
            state.request[name] = false;
        },
    },
    actions: Object.assign(actions(url), {

    }),
};
